http = require 'http'
ch = require 'child_process'
url = require 'url'
querystring = require 'querystring'

http.createServer (req,res)->
	req.setEncoding 'utf-8'
	pd = ""
	req.addListener 'data',(data)->
		pd += data
	req.addListener 'end',()->
		res.writeHead '200',{}
		ch.exec 'git pull',(err,stderr,stdout)->
			console.log stdout
		res.end()
.listen 4000
